Skip to content

Conversation

ltran-mdb2
Copy link
Collaborator

@ltran-mdb2 ltran-mdb2 commented Dec 4, 2024

DESCRIPTION

Users can now export code from their project files to a playground.

STAGING

https://deploy-preview-103--docs-mongodb-vscode.netlify.app/playgrounds/#create-a-new-playground
https://deploy-preview-103--docs-mongodb-vscode.netlify.app/copilot-export-test/
https://deploy-preview-103--docs-mongodb-vscode.netlify.app/export-to-language/#prerequisites

JIRA

https://jira.mongodb.org/browse/DOCSP-44687

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Is this free of spelling errors?
  • Is this free of grammatical errors?
  • Is this free of staging / rendering issues?
  • Are all the links working?

External Review Requirements

What's expected of an external reviewer?

Copy link

netlify bot commented Dec 4, 2024

Deploy Preview for docs-mongodb-vscode ready!

Name Link
🔨 Latest commit 1c48330
🔍 Latest deploy log https://app.netlify.com/sites/docs-mongodb-vscode/deploys/67535fd5c33125000823ee70
😎 Deploy Preview https://deploy-preview-103--docs-mongodb-vscode.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 42 (🟢 up 18 from production)
Accessibility: 91 (no change from production)
Best Practices: 75 (no change from production)
SEO: 75 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@sarah-olson-mongodb sarah-olson-mongodb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a ton @ltran-mdb2! LGTM with a couple minor style guide nits.


1. Open a project file.

To open a file in |vscode-short|, click on the file name in the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit -- click)
You can usually drop on. There are a couple instances. I'll just mark this one.

Suggested change
To open a file in |vscode-short|, click on the file name in the
To open a file in |vscode-short|, click the file name in the

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!


#. Highlight the code that you want to open in a playground.

#. Right click to select :guilabel:`Export Code to Playground`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit -- right-click)
Always hyphenate. There are a couple instances. I'll just mark this one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!


.. include:: /includes/steps/open-new-playground.rst

.. tab:: Your Project File

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ltran-mdb2 I think this might best for this to live in it's own nav as it is a complimentary feature to "Export to Language". We could call it "Test Application Query" in the nav and make the title "Export and Test Application Query in Playgrounds".

Lastly, on both of them (i.e. Export to Language) - could we call out that these features are currently only available for users who have Github Copilot & MongoDB's Copilot extension enabled?

.. tab:: Your Project File
:tabid: project-file

1. Open a project file.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be more specific, something like:
"Open your application project file that has the MongoDB query you want to export"


1. Open a project file.

To open a file in |vscode-short|, click the file name in the

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can omit this part (fairly obvious for users who use the IDE)

To open a file in |vscode-short|, click the file name in the
file explorer.

#. Highlight the code that you want to open in a playground.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we should be specific about "highlighting the code of the query you want to test"

#. Right-click to select :guilabel:`Export Code to Playground`.

Right-click your selected code to open the options menu.
Click :guilabel:`MongoDB Copilot Participant` >

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the immediate update coming up we're renaming this to "MongoDB Copilot Extension" instead of "Participant". Let's change it here so we don't have to amend shortly after.

:guilabel:`Export Code to Playground`.

When you click :guilabel:`Export Code to Playground`, |vscode-short|
opens a new playground with your selected code.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's specify that this opens a new MongoDB playground file with your query exported to MongoDB Shell syntax. You can then hit the run button in the top left corner to test this query with the cluster you are currently connected to in your MongoDB extension. You can iterate on your query in the playgrounds until you are happy with your query. Once the query looks good to you, you can export it back to your application code by using the Export to Language feature (link to Export to Language page).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add the note about exporting to language with the Export to Language PR (since this one will be merged first)

Copy link

@GaurabAryal GaurabAryal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of minor things!

source/index.txt Outdated
Connect </connect>
Manage Data </databases-collections>
Explore with Playgrounds </playgrounds>
Test Queries </copilot-export-test>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the miscommunication here @ltran-mdb2 – I meant to put this under "Explore with Playgrounds" tab, same level as "Export to Language".

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also include the word "Driver" in here? We can call it "Test Driver Queries"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!


.. note::

You can also open a new playground to test and export queries with the

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also add this note at the top of the "Export to Language" page? That feature now exclusively requires our Copilot extension.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link

@GaurabAryal GaurabAryal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@ltran-mdb2 ltran-mdb2 merged commit 38b040c into mongodb:master Dec 9, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants